//
//  HomeCreditCardModel.m
//
//
//  Created by gynjobs on 2017/8/14.
//  Copyright © 2017年 gynjobs. All rights reserved.
//

#import "HomeCreditCardModel.h"

@implementation HomeCreditCardModel
+(id)getCreditCardList:(id)data{
    
    NSArray * dataArray = [HomeCreditCardModel mj_objectArrayWithKeyValuesArray:data];
    return dataArray;
}

+(void)cacheCreditCardData:(id)data{
    
    if(data){
        
        [[CacheHelper getInstance] setCacheValue:data forKey:HOME_CREDIT_CARD_LIST_INFO];
    }
    
}
+(id)getCreditCardCache{
    
    id data = [[CacheHelper getInstance] getCacheValue:HOME_CREDIT_CARD_LIST_INFO];
    if(data){
        
        return [HomeCreditCardModel mj_objectArrayWithKeyValuesArray:data];
    }
    
    return nil;
}


+ (instancetype)copyWithModel:(id)model{
    HomeCreditCardModel *copy = [[HomeCreditCardModel alloc] init];
    copy.bank_id = [model bank_id];
    copy.bank_name = [model bank_name];
    copy.bank_img = [model bank_img];
    copy.label = [model label];
    copy.des = [model des];
    copy.apply_count = [model apply_count];
    copy.feature = [model feature];
    return copy;
}


- (id)copyWithZone:(NSZone *)zone{
    HomeCreditCardModel *copy = [[[self class] allocWithZone:zone] init];
    copy.bank_id = [self bank_id];
    copy.bank_name = [self bank_name];
    copy.bank_img = [self bank_img];
    copy.label = [self label];
    copy.des = [self des];
    copy.apply_count = [self apply_count];
    copy.feature = [self feature];
    return copy;
}
@end
